package com.xjrsoft.module.form.mapper;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.xjrsoft.module.base.vo.ModuleTreeEntityVo;
import com.xjrsoft.module.form.entity.XjrFormSchemeInfo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.xjrsoft.module.form.vo.FormSchemeInfoVo;
import com.xjrsoft.module.form.vo.SystemFormVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 自定义表单信息表 Mapper 接口
 * </p>
 *
 * @author jobob
 * @since 2020-11-11
 */
public interface XjrFormSchemeInfoMapper extends BaseMapper<XjrFormSchemeInfo> {

    List<FormSchemeInfoVo> getPageList(@Param("category") String category,@Param("keyword") String keyword, IPage page);

    List<SystemFormVo> getSystemFormList(@Param("keyword") String keyword,@Param("type") Integer type);

    SystemFormVo getSystemFormByFormId(@Param("formId") String formId);

    ModuleTreeEntityVo getModuleTreeEntityVoById(@Param("moduleId") String moduleId);

    int executeInsertSql(@Param("tableName")String tableName, @Param("map")Map<String, Object> map);

    int executeUpdateSql(@Param("tableName")String tableName, @Param("pk")String pk, @Param("pkValue")String pkValue, @Param("map")Map<String, Object> map);

    int executeDeleteSql(@Param("tableName")String tableName, @Param("field")String field, @Param("value")String value);
}
